﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate;
using NHibernate;
using schedulelist.ORM.dao.interfaces;
using schedulelist.ORM.dao.classes;

namespace schedulelist.ORM.dao
{
    public class NHibernateDAOFactory : DAOFactory
    {
        /** NHibernate sessionFactory */
        protected ISession session = null;
        public NHibernateDAOFactory(ISession session)
        {
            this.session = session;
        }
        public override ICategoryDAO getCategoryDAO()
        {
            return new CategoryDAO(session);
        }
        public override ICustomerDAO getCustomerDAO()
        {
            return new CustomerDAO(session);
        }
        public override IDepartamentDAO getDepartamentDAO()
        {
            return new DepartamentDAO(session);
        }
        public override IRoleDAO getRoleDAO()
        {
            return new RoleDAO(session);
        }
        public override IUserDAO getUserDAO()
        {
            return new UserDAO(session);
        }
        public override ITicketsDAO getTicketsDAO()
        {
            return new TicketsDAO(session);
        }
    }
}
